package observer00;

public class Client {
    public static void main(String[] args) throws InterruptedException {
        LiSi liSi = new LiSi();
        HanFeiZi hanFeiZi = new HanFeiZi();

        //观察吃早餐
        Spy watchBreakfast = new Spy(hanFeiZi, liSi, "breakfast");
        watchBreakfast.start();
        //开始看看韩非子在干嘛
        hanFeiZi.haveBreakfast();
        Thread.sleep(1000);

        System.out.println("============");
        //观察娱乐情况
        Spy watchFun = new Spy(hanFeiZi, liSi, "fun");
        watchFun.start();
        //看看韩非子在干嘛
        hanFeiZi.haveFun();
    }
}
